import { defineComponent, h , toRefs, watch} from 'vue'
import enemyBulletImage from '../../resource/assets/bunny.png'


export default defineComponent({
  props: ['x','y'],
  setup(props, ctx) {
    //普通解构会导致响应式丢失
    const {x, y} = toRefs(props)
    return {
      x,
      y
    }
  },
  render(ctx) {
    return  h('Container', {x:ctx.x, y:ctx.y} , [ 
      h('Sprite', {texture: enemyBulletImage , width: 30, height: 50 })
    ])
  }
})